/**
 */
package gatperdut.chato.model.Chato.Room.impl;

import gatperdut.chato.model.Chato.ChatoPackage;
import gatperdut.chato.model.Chato.Constant.ConstantPackage;
import gatperdut.chato.model.Chato.Constant.impl.ConstantPackageImpl;
import gatperdut.chato.model.Chato.Container.ContainerPackage;
import gatperdut.chato.model.Chato.Container.impl.ContainerPackageImpl;
import gatperdut.chato.model.Chato.Craft.CraftPackage;
import gatperdut.chato.model.Chato.Craft.impl.CraftPackageImpl;
import gatperdut.chato.model.Chato.Entity.EntityPackage;
import gatperdut.chato.model.Chato.Entity.Skill.SkillPackage;
import gatperdut.chato.model.Chato.Entity.Skill.impl.SkillPackageImpl;
import gatperdut.chato.model.Chato.Entity.impl.EntityPackageImpl;
import gatperdut.chato.model.Chato.Item.ItemPackage;
import gatperdut.chato.model.Chato.Item.impl.ItemPackageImpl;
import gatperdut.chato.model.Chato.Player.PlayerPackage;
import gatperdut.chato.model.Chato.Player.impl.PlayerPackageImpl;
import gatperdut.chato.model.Chato.Room.Door;
import gatperdut.chato.model.Chato.Room.Room;
import gatperdut.chato.model.Chato.Room.RoomFactory;
import gatperdut.chato.model.Chato.Room.RoomPackage;
import gatperdut.chato.model.Chato.Util.UtilPackage;
import gatperdut.chato.model.Chato.Util.impl.UtilPackageImpl;
import gatperdut.chato.model.Chato.impl.ChatoPackageImpl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class RoomPackageImpl extends EPackageImpl implements RoomPackage {
	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass roomEClass = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass doorEClass = null;

	/**
     * Creates an instance of the model <b>Package</b>, registered with
     * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
     * package URI value.
     * <p>Note: the correct way to create the package is via the static
     * factory method {@link #init init()}, which also performs
     * initialization of the package, or returns the registered package,
     * if one already exists.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see org.eclipse.emf.ecore.EPackage.Registry
     * @see gatperdut.chato.model.Chato.Room.RoomPackage#eNS_URI
     * @see #init()
     * @generated
     */
	private RoomPackageImpl() {
        super(eNS_URI, RoomFactory.eINSTANCE);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private static boolean isInited = false;

	/**
     * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
     * 
     * <p>This method is used to initialize {@link RoomPackage#eINSTANCE} when that field is accessed.
     * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #eNS_URI
     * @see #createPackageContents()
     * @see #initializePackageContents()
     * @generated
     */
	public static RoomPackage init() {
        if (isInited) return (RoomPackage)EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI);

        // Obtain or create and register package
        RoomPackageImpl theRoomPackage = (RoomPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RoomPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RoomPackageImpl());

        isInited = true;

        // Obtain or create and register interdependencies
        ChatoPackageImpl theChatoPackage = (ChatoPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ChatoPackage.eNS_URI) instanceof ChatoPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ChatoPackage.eNS_URI) : ChatoPackage.eINSTANCE);
        PlayerPackageImpl thePlayerPackage = (PlayerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI) instanceof PlayerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI) : PlayerPackage.eINSTANCE);
        EntityPackageImpl theEntityPackage = (EntityPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) instanceof EntityPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) : EntityPackage.eINSTANCE);
        SkillPackageImpl theSkillPackage = (SkillPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) instanceof SkillPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) : SkillPackage.eINSTANCE);
        ItemPackageImpl theItemPackage = (ItemPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI) instanceof ItemPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI) : ItemPackage.eINSTANCE);
        ConstantPackageImpl theConstantPackage = (ConstantPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI) instanceof ConstantPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI) : ConstantPackage.eINSTANCE);
        ContainerPackageImpl theContainerPackage = (ContainerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) instanceof ContainerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) : ContainerPackage.eINSTANCE);
        CraftPackageImpl theCraftPackage = (CraftPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) instanceof CraftPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) : CraftPackage.eINSTANCE);
        UtilPackageImpl theUtilPackage = (UtilPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) instanceof UtilPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) : UtilPackage.eINSTANCE);

        // Create package meta-data objects
        theRoomPackage.createPackageContents();
        theChatoPackage.createPackageContents();
        thePlayerPackage.createPackageContents();
        theEntityPackage.createPackageContents();
        theSkillPackage.createPackageContents();
        theItemPackage.createPackageContents();
        theConstantPackage.createPackageContents();
        theContainerPackage.createPackageContents();
        theCraftPackage.createPackageContents();
        theUtilPackage.createPackageContents();

        // Initialize created meta-data
        theRoomPackage.initializePackageContents();
        theChatoPackage.initializePackageContents();
        thePlayerPackage.initializePackageContents();
        theEntityPackage.initializePackageContents();
        theSkillPackage.initializePackageContents();
        theItemPackage.initializePackageContents();
        theConstantPackage.initializePackageContents();
        theContainerPackage.initializePackageContents();
        theCraftPackage.initializePackageContents();
        theUtilPackage.initializePackageContents();

        // Mark meta-data to indicate it can't be changed
        theRoomPackage.freeze();

  
        // Update the registry and return the package
        EPackage.Registry.INSTANCE.put(RoomPackage.eNS_URI, theRoomPackage);
        return theRoomPackage;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getRoom() {
        return roomEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getRoom_Title() {
        return (EAttribute)roomEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getRoom_Description() {
        return (EAttribute)roomEClass.getEStructuralFeatures().get(1);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_N() {
        return (EReference)roomEClass.getEStructuralFeatures().get(2);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_E() {
        return (EReference)roomEClass.getEStructuralFeatures().get(3);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_S() {
        return (EReference)roomEClass.getEStructuralFeatures().get(4);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_W() {
        return (EReference)roomEClass.getEStructuralFeatures().get(5);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_U() {
        return (EReference)roomEClass.getEStructuralFeatures().get(6);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_D() {
        return (EReference)roomEClass.getEStructuralFeatures().get(7);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_DN() {
        return (EReference)roomEClass.getEStructuralFeatures().get(8);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_DE() {
        return (EReference)roomEClass.getEStructuralFeatures().get(9);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_DS() {
        return (EReference)roomEClass.getEStructuralFeatures().get(10);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_DW() {
        return (EReference)roomEClass.getEStructuralFeatures().get(11);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_DU() {
        return (EReference)roomEClass.getEStructuralFeatures().get(12);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_DD() {
        return (EReference)roomEClass.getEStructuralFeatures().get(13);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getRoom_Inventory() {
        return (EReference)roomEClass.getEStructuralFeatures().get(14);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getDoor() {
        return doorEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getDoor_OocDesc() {
        return (EAttribute)doorEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getDoor_Desc() {
        return (EAttribute)doorEClass.getEStructuralFeatures().get(1);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getDoor_Open() {
        return (EAttribute)doorEClass.getEStructuralFeatures().get(2);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getDoor_SeeThrough() {
        return (EAttribute)doorEClass.getEStructuralFeatures().get(3);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getDoor_SingleWord() {
        return (EAttribute)doorEClass.getEStructuralFeatures().get(4);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getDoor_Lock() {
        return (EReference)doorEClass.getEStructuralFeatures().get(5);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public RoomFactory getRoomFactory() {
        return (RoomFactory)getEFactoryInstance();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isCreated = false;

	/**
     * Creates the meta-model objects for the package.  This method is
     * guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void createPackageContents() {
        if (isCreated) return;
        isCreated = true;

        // Create classes and their features
        roomEClass = createEClass(ROOM);
        createEAttribute(roomEClass, ROOM__TITLE);
        createEAttribute(roomEClass, ROOM__DESCRIPTION);
        createEReference(roomEClass, ROOM__N);
        createEReference(roomEClass, ROOM__E);
        createEReference(roomEClass, ROOM__S);
        createEReference(roomEClass, ROOM__W);
        createEReference(roomEClass, ROOM__U);
        createEReference(roomEClass, ROOM__D);
        createEReference(roomEClass, ROOM__DN);
        createEReference(roomEClass, ROOM__DE);
        createEReference(roomEClass, ROOM__DS);
        createEReference(roomEClass, ROOM__DW);
        createEReference(roomEClass, ROOM__DU);
        createEReference(roomEClass, ROOM__DD);
        createEReference(roomEClass, ROOM__INVENTORY);

        doorEClass = createEClass(DOOR);
        createEAttribute(doorEClass, DOOR__OOC_DESC);
        createEAttribute(doorEClass, DOOR__DESC);
        createEAttribute(doorEClass, DOOR__OPEN);
        createEAttribute(doorEClass, DOOR__SEE_THROUGH);
        createEAttribute(doorEClass, DOOR__SINGLE_WORD);
        createEReference(doorEClass, DOOR__LOCK);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isInitialized = false;

	/**
     * Complete the initialization of the package and its meta-model.  This
     * method is guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void initializePackageContents() {
        if (isInitialized) return;
        isInitialized = true;

        // Initialize package
        setName(eNAME);
        setNsPrefix(eNS_PREFIX);
        setNsURI(eNS_URI);

        // Obtain other dependent packages
        ItemPackage theItemPackage = (ItemPackage)EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI);
        UtilPackage theUtilPackage = (UtilPackage)EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI);

        // Create type parameters

        // Set bounds for type parameters

        // Add supertypes to classes

        // Initialize classes, features, and operations; add parameters
        initEClass(roomEClass, Room.class, "Room", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getRoom_Title(), ecorePackage.getEString(), "title", null, 1, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getRoom_Description(), ecorePackage.getEString(), "description", null, 1, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_N(), this.getRoom(), null, "n", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_E(), this.getRoom(), null, "e", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_S(), this.getRoom(), null, "s", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_W(), this.getRoom(), null, "w", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_U(), this.getRoom(), null, "u", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_D(), this.getRoom(), null, "d", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_DN(), this.getDoor(), null, "dN", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_DE(), this.getDoor(), null, "dE", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_DS(), this.getDoor(), null, "dS", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_DW(), this.getDoor(), null, "dW", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_DU(), this.getDoor(), null, "dU", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_DD(), this.getDoor(), null, "dD", null, 0, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getRoom_Inventory(), theItemPackage.getBoxInventory(), null, "inventory", null, 1, 1, Room.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);

        initEClass(doorEClass, Door.class, "Door", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getDoor_OocDesc(), ecorePackage.getEString(), "oocDesc", null, 1, 1, Door.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDoor_Desc(), ecorePackage.getEString(), "desc", null, 1, 1, Door.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDoor_Open(), ecorePackage.getEBoolean(), "open", null, 1, 1, Door.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDoor_SeeThrough(), ecorePackage.getEBoolean(), "seeThrough", null, 1, 1, Door.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDoor_SingleWord(), ecorePackage.getEString(), "singleWord", null, 1, 1, Door.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDoor_Lock(), theUtilPackage.getLock(), null, "lock", null, 0, 1, Door.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    }

} //RoomPackageImpl
